import 'package:flutter/material.dart';
import 'package:flutter_project/moudle/root/tab_model.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class CusBottomTabItem extends StatelessWidget {
  final bool isSelected;
  final TabModel tabModel;
  final VoidCallback onTap;
  const CusBottomTabItem({
    super.key,
    required this.isSelected,
    required this.tabModel,
    required this.onTap,
  });

  @override
  Widget build(BuildContext context) {
    return Expanded(
        child: GestureDetector(
            onTap: onTap,
            child: Column(
              children: [
                10.verticalSpace,
                Image.asset(
                  isSelected ? tabModel.selIcon : tabModel.icon,
                  width: 30.h,
                  height: 30.h,
                ),
                4.verticalSpace,
                Text(
                  tabModel.title,
                  style: TextStyle(
                    color: isSelected ? Colors.black : Colors.grey,
                    fontSize: 10.sp,
                  ),
                )
              ],
            )));
  }
}
